<?php 
header ('Content-type: text/html; charset=utf-8');
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);
defined('APP_PATH') ? null : define('APP_PATH', 'mcot_login' . DS . 'application');

require_once (APP_PATH . DS . 'initialize.php');

if (!$_SESSION['logged_in'])
{
    redirect_to('mcot_login/administrator/login.php');
} 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>MCOT - Live tv programs</title>



<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>

<script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.4.pack.js"></script>

<script type="text/javascript" src="js/main.js"></script>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<link rel="stylesheet" type="text/css" href="css/jquery-ui-1.8.16.custom.css" />

</head>


<body> 

<div style='background:#4a007d; padding:6px 12px; hieght:20px; overflow: auto; font-size: 1.3em; color:#fff; font-weight: bold;'>
<span style ='color:#f94d01' >MCOT</span> <span> LIVE  FEED  MANAGER</span>
</div>





<div style=' padding:0px; hieght:40px; overflow: auto; background: #fff; padding-top: 20px'>
<ul class='tabs' style='margin: 0px; padding: 0px; position: relative;' >
<li id='typeList'>Group Editor</li>
<li id='releaseList'>Release-List Editor</li>

<li id='logout' style='float:right;margin-right: 6px;'>Log Out</li>
<li id='save' style='float:right;margin-right: 6px; padding: 0px 48px;'>Save</li>
</ul>
</div>







<div>
<div style='width: 100%; height: auto; overflow: auto; border-top: 2px solid #f94d01; '></div><br/>
<div id="edit-wrapper">
<div class="place-holder">
	<table border='0' style="float:left;">
	<tr>
	<td>Group ID</td>
	<td><input type="text" name="g-id" size="80" maxlength="4" id="g-id-zip"/></td>
	</tr>
	
	<tr>
	<td>Group Name</td>
	<td><input type="text" name="g-name" size="80"/></td>
	</tr>
	
	<tr>
	<td>Group Description</td>
	<td><textarea name="g-description" rows="3" cols="60"></textarea></td>
	</tr>
	
	<!--
	<tr>
	<td>Prop. map</td>
	<td>
		<input type="text" name="g-propmap" size="80" />
		<input type="text" name="sort" style="display: none;" value="x" />
	</td>
	</tr>
	  -->	
	</table>
	
<a class="add-new-group-list" href="javaScript:void();"> + Add new group</a>
</div>
<br/>
<hr/>



<ul class= "group-list">
</ul>




</div>

<div id="release-wrapper">
<div class="release-place-holder">
	<table border='0' style="float:left;">
	
	<tr>
	<td>Group </td>
	<td><select name='r-id'></select></td>
	</tr>
	
	<tr>
	<td>ID</td>
	<td>
	<!-- <input type="text" name="r-mode" size="80" maxlength="4" value="0"/> -->
	 	
	<!-- select name="r-mode">
		<option value="4">Video Lan mode</option>
		<option value="0">Windows Media Player mode</option>
	</select> 
	 -->
	 <input type="text" name="r-idx" size="80" id="l-id-zip"/>
	 
	</td>
	</tr>
	
	
	<tr>
	<td>Mode </td>
	<td><select name='r-mode'>
	<option value = '4'>Video Lan mode</option>
	<option value = '0'>Windows Media Player mode</option>
	</select></td>
	</tr>
	
	
	<tr>
	<td>Name</td>
	<td><input type="text" name="r-name" size="80"/></td>
	</tr>
	
	<tr>
	<td>play URL</td>
	<td><input type="text" name="r-url" size="80"/></td>
	</tr>
	
	<tr>
	<td>image URL</td>
	<td><input type="text" name="image-url" size="80"/></td>
	</tr>
	
	
	</table>
	
<a class="add-new-release-list" href="javaScript:void();"> + Add new releaseList</a>
<img src='' width='90' height='90'></img>
</div>
<br/>
<hr/>

<ul class= "list">

</ul>


</div>


<div id="result-wrapper">
result wrapper
</div>

<!-- From to save list to root/live.json -->
<form name="myform" id="save_json_form" action="write_file.php" method="post" >
<input type="hidden" name="wFile" value="live.json"/>
<input type="hidden" id="hidden_content_to_save" name="content" />
<iframe id="write_file_target_frame" name="write_file_target_frame" src="javaScript:void();" style="width:0px;height:0px;border:0px solid #000;"></iframe>
</form>



</div>
</body>

</html>
















<div class="modal" style='display:none'>
<li class="group-list-item" id="group-list-item-stuff">
		<div class="drag-area" id="order">#</div>
		<div class="detail">
			<span><p id="g-id">Group ID</p></span>
			<span><p id="g-name">Group Name</p></span>
			<p id="g-description">Group Description</p>
			<!-- <p id="g-propmap">Prop. map</p> -->
		</div>
		<div class="action">
			<ul>
				<li><a href="javaScript:void();" class="up-button" style='visibility:hidden'>up</a></li>
				<li><a href="javaScript:void();" class="down-button" style='visibility:hidden'>down</a></li>
			</ul>
			
			<a href="javaScript:void();" class="delete-button">delete</a><br/>
			<!--a href="javaScript:void();" class="list-button">list</a-->
			
		</div>
</li>


<li class="release-list-item" id="release-list-item-stuff">
		<img src='x' width="90" height="90"/> 
		<div class="detail">
			<p id="l-id">Type ID</p>
			<p id="l-idx">This id</p>
			<p id="l-mode">Mode</p>
			<p id="l-name">Name</p>
			<p id="l-url">URL</p>
			<p id="l-image">Image</p>
		</div>
		<div class="action">
			<a href="javaScript:void();" class="delete-button-l">delete</a><br/>
		</div>
</li>


</div>




